package com.ytjj.qmyx.supplychain.api.controller;

import com.ytjj.qmyx.supplychain.common.api.CommonResult;
import com.ytjj.qmyx.supplychain.mapper.entity.ReturnDuty;
import com.ytjj.qmyx.supplychain.service.ReturnDutyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/returnDuty")
public class ReturnDutyController {

    @Autowired
    private ReturnDutyService returnDutyService;

    @PostMapping("/saveOrUpdateReturnDuty")
    public CommonResult saveOrUpdateReturnDuty(@RequestBody ReturnDuty returnDuty) {
        returnDutyService.saveOrUpdateReturnDuty(returnDuty);
        return CommonResult.success();
    }
}
